package com.jiazhong.basic.pack0309;

import java.util.ArrayList;
import java.util.List;

public class DemoD4 {

    private static void a(List<Integer> list){
        System.out.println("a中原来的值：" + list);
        list.add(23);
        System.out.println("a中修改后的值：" + list);
    }

    private static void b(List<Integer> list){
        System.out.println("b中原来的值：" + list);
        a(list);
        System.out.println("a中修改后在b中的值：" + list);
    }

    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        list.add(22);
        list.add(33);
        b(list);
        System.out.println(list);
    }
}
